package com.yc.mapper;

import com.yc.entities.BloodSugarGluce;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yc.entities.BloodSugarPatientInfo;
import com.yc.entities.custom.AppHomePageUserBean;
import com.yc.entities.custom.GluceDataTable;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 血糖测量数据 Mapper 接口
 * </p>
 *
 * @author kuakha
 * @since 2021-04-07
 */
public interface BloodSugarGluceMapper extends BaseMapper<BloodSugarGluce> {

    List<BloodSugarGluce> getGluceDataByType(@Param("userId") String userId, @Param("attr")String attr);

    List<GluceDataTable> getGluceDataByDate(@Param("userId") String userId, @Param("dateType")String dateType);

    List<BloodSugarGluce> getGluceDataByAttrAndNow(@Param("attr") String attr,@Param("userId")String userId);

    int abnormalDataCount(@Param("doctorId")String doctorId,@Param("departmentId")String departmentId);

    List<AppHomePageUserBean> getAbnormalDataByUser(BloodSugarPatientInfo bloodSugarPatientInfo);

}
